#ifndef GPS_H
#define GPS_H

#include "Gpsapi.h"
#include "afxwin.h"

class Gps {

public:
	struct GPSCOORD {
		double latitude;
		double longitude;
		bool valid;
		wchar_t szMessage[256];
		void init() {
			latitude = 0;
			longitude = 0;
			valid = false;
			memset(szMessage, 0, sizeof szMessage);
		}
	};

	Gps();
	~Gps();

	bool openDevice();
	GPSCOORD* getPosition();
private:
	HANDLE gps_h;
	HANDLE g_hGPSEvents[2];
};










#endif
